#!/bin/bash

################################
# Get all interfaces           #
################################
function get_NIC {
	ifconfig  | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}'
	#ifconfig  | grep -E 'inet.[0-9]' | grep -v '127.0.0.1' | awk '{ print $2}'      #for BSDs
	#ifconfig -a | grep inet | grep -v '127.0.0.1' | awk '{ print $2}'   #for solaris
}

case "$1" in
get_NIC) get_NIC
	;;
*) cat libnet|grep "function"
	;;
esac

